package com.jiadao.service;

/**
 * 获取办理人抽象类
 */
public abstract class AssigneeService{


    /**
     * 获取当前用户id
     * @return
     */
    public abstract String getCurrentUserId();

    /**
     * 获取经理id
     * @return
     */
    public abstract String getManagerId();

    /**
     * 获取老板id
     * @return
     */
    public abstract String getBossId();

    /**
     * 根据审批人代码，获取审批人id
     * @param assigneeCode
     * @return
     */
    public String getNextAssigneeId(String assigneeCode){
        switch(assigneeCode){
            case "initator": return getCurrentUserId();
            case "manager": return getManagerId();
            case "boss": return getBossId();
            default: return null;
        }
    }
}